package com.sunlee.common.service.service;


import com.sunlee.common.service.dto.CategoryDTO;
import com.sunlee.common.service.dto.ThirdCategoryMappingDTO;
import com.sunlee.common.service.entity.ThirdCategoryMappingEntity;

import java.util.List;

/**
 * 三方分类映射表
 *
 * @author sunlee
 * @date 2023-03-09
 */
public interface ThirdCategoryMappingService extends CrudService<ThirdCategoryMappingEntity, ThirdCategoryMappingDTO> {

    /**
     * 通过第三方分类Id，查询己方分类列表
     *
     * @param thirdCategoryId 三方分类ID
     * @return 己方分类列表
     */
    List<CategoryDTO> queryCategoryByThirdCategoryId(long thirdCategoryId);

    /**
     * 保存己方三方分类映射
     *
     * @param categoryId      己方分类ID
     * @param thirdCategoryId 三方分类Id
     * @return 是否成功
     */
    boolean saveByMappingId(Long categoryId, Long thirdCategoryId);

    /**
     * 删除己方三方分类映射
     *
     * @param categoryId      己方分类ID
     * @param thirdCategoryId 三方分类Id
     * @return 是否成功
     */
    boolean removeByMappingId(Long categoryId, Long thirdCategoryId);

}
